{extend name="default/base/base_seller" /}
{block name="seller_main"}
<style>
    .text-left {
        text-align: left !important;
    }
</style>
<form method="get">
    <table class="search-form">
        <tbody>
        <tr>
            <th>手机号</th>
            <td class="w160">
                <input type="text" value="{$mobile}" name="mobile" class="txt">
            </td>
            <th>技能类型</th>
            <td class="w50">
                <select name="search_skillid">
                    <option value="">--请选择</option>
                    {foreach name='skillArr' item='v'}
                    {if $search_skillid==$v.id }
                    <option value="{$v.id}" selected>{$v.name}</option>
                    {else}
                    <option value="{$v.id}">{$v.name}</option>
                    {/if}
                    {/foreach} </select>
            </td>
            <th>等级</th>
            <td class="tl">
                <select name="search_grade">
                    <option value="">--请选择</option>
                    {foreach name='gradeArr' item='v'}
                    {if $search_grade==$v.id }
                    <option value="{$v.id}" selected>{$v.name}</option>
                    {else}
                    <option value="{$v.id}">{$v.name}</option>
                    {/if}
                    {/foreach}
                </select>
            </td>

            <td class="w70 tc">
                <input type="submit" class="submit" value="搜索">
            </td>
        </tr>
        </tbody>
    </table>
</form>

<table class="dssc-default-table">
    <thead>
    <tr>
        <th class="w60">序号</th>
        <th>人员</th>
        <th class="tl"></th>
        <th class="tl">手机号</th>
        <th class="tl">邀请码</th>
        <th class="tl">技能类型</th>
        <th class="tl">性别</th>
        <th class="tl">等级</th>
        <th class="tl">实名认证状态</th>
        <th class="w200">操作</th>
    </tr>
    </thead>
    <tbody>
    {notempty name="member_list"}
    <?php $index = 1;?>
    {foreach name="member_list" item="v" key="key" }
    <tr class="bd-line">
        <td>{$index}</td>
        <td style="width: 50px;">
            <div class="size-44x44">
                  <span class="thumb"><i></i>
                      <img src="{:get_member_avatar($v.avtar)}?{:microtime()}" width="44" height="44"/>
                  </span>
            </div>
        </td>
        <td style="text-align: left">
            <p class="name"><strong>
                {if $v.cardstatus ==0} 未认证 {elseif $v.cardstatus ==1} {$v.name} {elseif $v.cardstatus ==2} 未认证 {elseif
                $v.cardstatus ==3} 等待认证 {else /} 未认证{/if}
            </strong></p>
            <p class="smallfont">注册时间:&nbsp;{$v.created_at}</p>
        </td>
        <td class="text-left">{$v.phone}</td>
        <td class="text-left">{$v.code}</td>
        <td class="text-left">{$v.skillname}</td>
        <td class="text-left">{if $v.sex==0} 保密 {elseif
            $v.sex==1} 男 {elseif $v.sex==2} 女 {/if}
        </td>
        <td class="text-left">{$v.gradename}</td>
        <td class="text-left">{if $v.cardstatus ==0} 未认证 {elseif $v.cardstatus ==1} 认证成功 {elseif $v.cardstatus ==2} 认证失败
            {elseif
            $v.cardstatus ==3} 已提交信息等待认证 {/if}
        </td>
        <td class="dscs-table-handle"><span>
            <a href="javascript:void(0);" onclick="service_info({$v.id});" class="btn-green"><p>查看更多</p></a></span>
            <span>
                  <span><a href="javascript:void(0)" onclick="ds_ajaxget_confirm('{:url('Servicepersonal/remove',['id'=>$v.id])}','是否要移除该服务人员吗？');" class="btn-red"><p>移除</p></a></span>
           </span>
        </td>
    </tr>
    <?php $index++;?>
    {/foreach}
    {else /}
    <tr>
        <td colspan="20" class="norecord">
            <div class="warning-option"><i class="iconfont">&#xe64c;</i><span>{$Think.lang.no_record}</span></div>
        </td>
    </tr>
    {/notempty}
    </tbody>
</table>


<script>
    //查看详情  服务人员详细信息
    function service_info(id) {
        _uri = HOMESITEURL + "/Servicepersonal/service_info?id=" + id;
        dsLayerOpen(_uri, '查看详情', '1000px', '800px');
    }

    /**
     * Layer 通用ifram弹出窗口
     */
    function dsLayerOpen(url, title, width, height) {
        if (!width) width = '900px';
        if (!height) height = '500px';
        layer.open({
            type: 2,
            title: title,
            area: [width, height],
            fixed: false, //不固定
            maxmin: true,
            content: url
        });
    }

</script>

{/block}

